using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._DataManagementTools._Package
{
    /// <summary>
    /// <para>Consolidate Toolbox</para>
    /// <para>Consolidates one or more toolboxes (a .tbx or .pyt file) to a specified output folder.</para>
    /// <para>将一个或多个工具箱（.tbx 或 .pyt 文件）合并到指定的输出文件夹。</para>
    /// </summary>    
    [DisplayName("Consolidate Toolbox")]
    public class ConsolidateToolbox : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public ConsolidateToolbox()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_toolbox">
        /// <para>Toolbox</para>
        /// <para>The toolboxes to be consolidated.</para>
        /// <para>要合并的工具箱。</para>
        /// </param>
        /// <param name="_output_folder">
        /// <para>Output Folder</para>
        /// <para><xdoc>
        ///   <para>The output folder that will contain the consolidated toolbox.</para>
        ///   <para>If the specified folder does not exist, a new folder will be created.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>将包含合并工具箱的输出文件夹。</para>
        ///   <para>如果指定的文件夹不存在，则将创建一个新文件夹。</para>
        /// </xdoc></para>
        /// </param>
        public ConsolidateToolbox(List<object> _in_toolbox, object _output_folder)
        {
            this._in_toolbox = _in_toolbox;
            this._output_folder = _output_folder;
        }
        public override string ToolboxName => "Data Management Tools";

        public override string ToolName => "Consolidate Toolbox";

        public override string CallName => "management.ConsolidateToolbox";

        public override List<string> AcceptEnvironments => [];

        public override object[] ParameterInfo => [_in_toolbox, _output_folder, _version.GetGPValue()];

        /// <summary>
        /// <para>Toolbox</para>
        /// <para>The toolboxes to be consolidated.</para>
        /// <para>要合并的工具箱。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Toolbox")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public List<object> _in_toolbox { get; set; }


        /// <summary>
        /// <para>Output Folder</para>
        /// <para><xdoc>
        ///   <para>The output folder that will contain the consolidated toolbox.</para>
        ///   <para>If the specified folder does not exist, a new folder will be created.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>将包含合并工具箱的输出文件夹。</para>
        ///   <para>如果指定的文件夹不存在，则将创建一个新文件夹。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Folder")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _output_folder { get; set; }


        /// <summary>
        /// <para>Version</para>
        /// <para><xdoc>
        ///   <para>Specifies the version of the consolidated toolbox. Specifying a version allows toolboxes to be shared with previous versions of ArcGIS and supports backward compatibility.</para>
        ///   <bulletList>
        ///     <bullet_item>Current version—The consolidated folder will contain tools compatible with the version of the current release. This is the default.</bullet_item><para/>
        ///     <bullet_item>2.1—The consolidated folder will contain tools compatible with version 2.1.</bullet_item><para/>
        ///     <bullet_item>2.2— The consolidated folder will contain tools compatible with version 2.2.</bullet_item><para/>
        ///     <bullet_item>2.3—The consolidated folder will contain tools compatible with version 2.3.</bullet_item><para/>
        ///     <bullet_item>2.4—The consolidated folder will contain tools compatible with version 2.4.</bullet_item><para/>
        ///     <bullet_item>2.5—The consolidated folder will contain tools compatible with version 2.5.</bullet_item><para/>
        ///     <bullet_item>2.6—The consolidated folder will contain tools compatible with version 2.6.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定合并工具箱的版本。指定版本允许与先前版本的 ArcGIS 共享工具箱，并支持向后兼容性。</para>
        ///   <bulletList>
        ///     <bullet_item>当前版本 - 合并文件夹将包含与当前版本版本兼容的工具。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>2.1 - 合并文件夹将包含与版本 2.1 兼容的工具。</bullet_item><para/>
        ///     <bullet_item>2.2 - 合并文件夹将包含与版本 2.2 兼容的工具。</bullet_item><para/>
        ///     <bullet_item>2.3 - 合并文件夹将包含与版本 2.3 兼容的工具。</bullet_item><para/>
        ///     <bullet_item>2.4 - 合并文件夹将包含与版本 2.4 兼容的工具。</bullet_item><para/>
        ///     <bullet_item>2.5 - 合并文件夹将包含与版本 2.5 兼容的工具。</bullet_item><para/>
        ///     <bullet_item>2.6 - 合并文件夹将包含与版本 2.6 兼容的工具。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Version")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _version_value _version { get; set; } = _version_value._CURRENT;

        public enum _version_value
        {
            /// <summary>
            /// <para>Current version</para>
            /// <para>Current version—The consolidated folder will contain tools compatible with the version of the current release. This is the default.</para>
            /// <para>当前版本 - 合并文件夹将包含与当前版本版本兼容的工具。这是默认设置。</para>
            /// </summary>
            [Description("Current version")]
            [GPEnumValue("CURRENT")]
            _CURRENT,

            /// <summary>
            /// <para>2.1</para>
            /// <para>2.1—The consolidated folder will contain tools compatible with version 2.1.</para>
            /// <para>2.1 - 合并文件夹将包含与版本 2.1 兼容的工具。</para>
            /// </summary>
            [Description("2.1")]
            [GPEnumValue("2.1")]
            value1,

            /// <summary>
            /// <para>2.2</para>
            /// <para>2.2— The consolidated folder will contain tools compatible with version 2.2.</para>
            /// <para>2.2 - 合并文件夹将包含与版本 2.2 兼容的工具。</para>
            /// </summary>
            [Description("2.2")]
            [GPEnumValue("2.2")]
            value2,

            /// <summary>
            /// <para>2.3</para>
            /// <para>2.3—The consolidated folder will contain tools compatible with version 2.3.</para>
            /// <para>2.3 - 合并文件夹将包含与版本 2.3 兼容的工具。</para>
            /// </summary>
            [Description("2.3")]
            [GPEnumValue("2.3")]
            value3,

            /// <summary>
            /// <para>2.4</para>
            /// <para>2.4—The consolidated folder will contain tools compatible with version 2.4.</para>
            /// <para>2.4 - 合并文件夹将包含与版本 2.4 兼容的工具。</para>
            /// </summary>
            [Description("2.4")]
            [GPEnumValue("2.4")]
            value4,

            /// <summary>
            /// <para>2.5</para>
            /// <para>2.5—The consolidated folder will contain tools compatible with version 2.5.</para>
            /// <para>2.5 - 合并文件夹将包含与版本 2.5 兼容的工具。</para>
            /// </summary>
            [Description("2.5")]
            [GPEnumValue("2.5")]
            value5,

            /// <summary>
            /// <para>2.6</para>
            /// <para>2.6—The consolidated folder will contain tools compatible with version 2.6.</para>
            /// <para>2.6 - 合并文件夹将包含与版本 2.6 兼容的工具。</para>
            /// </summary>
            [Description("2.6")]
            [GPEnumValue("2.6")]
            value6,

            /// <summary>
            /// <para>2.7</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("2.7")]
            [GPEnumValue("2.7")]
            value7,

        }

        public ConsolidateToolbox SetEnv()
        {
            base.SetEnv();
            return this;
        }

    }

}